#ifndef __RFIDLIB_AIP_ISO18000P3M3_H__
#define __RFIDLIB_AIP_ISO18000P3M3_H__

#include "rfidlib.h"

#ifdef __cplusplus
extern "C" {
#endif


RFID_API RFID_DN_HANDLE ISO18000p3m3_CreateInvenParam(RFID_DN_HANDLE hInvenParamSpecList, 
													 BYTE AntennaID /* By default set to 0, apply to all antenna */, 
													BYTE Sel, 
												   BYTE Session, 
													BYTE Q 
													 );

RFID_API err_t  ISO18000p3m3_SetInvenSelectParam(RFID_DN_HANDLE hIso18000p3m3InvenParam, 
											        BYTE target, 
													 BYTE action, 
													  BYTE memBank, 
													    DWORD dwPointer, 
														BYTE maskBits[], 
														  BYTE maskBitLen, 
														  BYTE truncate);

RFID_API err_t ISO18000p3m3_SetInvenReadParam(RFID_DN_HANDLE hIso18000p3m3InvenParam, BYTE MemBank, DWORD WordPtr, BYTE WordCount);



RFID_API err_t ISO18000p3m3_ParseTagDataReport(RFID_DN_HANDLE hTagReport, 
												  DWORD *aip_id, 
												  DWORD *tag_id, 
												  DWORD * ant_id, 
												  DWORD *metaFlags, 
												  BYTE tagdata[], 
												  DWORD *tagDataLen);


RFID_API err_t ISO18000p3m3_Connect(RFID_READER_HANDLE hr, 
								   DWORD tagType, //0:reader default setting
								   BYTE epcBits[], 
								   DWORD epcBitsLen, 
								   BOOLEAN setPwd, /* 是否验证access password */
								   DWORD accessPwd, 
								   RFID_TAG_HANDLE *ht
								   );




RFID_API err_t ISO18000p3m3_Read(RFID_READER_HANDLE hr, 
									RFID_TAG_HANDLE ht, 
									BYTE memBank, 
									DWORD startWord, 
									BYTE wordCnt, 
									BYTE wordBuffer[], 
									DWORD *nSize /* In:size of buffer;Out:bytes written 	*/
								 );

RFID_API err_t ISO18000p3m3_Write(RFID_READER_HANDLE hr, 
										RFID_TAG_HANDLE ht, 
										BYTE memBank, 
										DWORD startWord, 
										BYTE wordCnt, 
										BYTE wordData[], 
										DWORD nSize);


RFID_API err_t ISO18000p3m3_Lock(RFID_READER_HANDLE hr, 
										RFID_TAG_HANDLE ht, 
										WORD mask, 
										WORD action 
										);

RFID_API err_t ISO18000p3m3_Kill(RFID_READER_HANDLE hr, 
										RFID_TAG_HANDLE ht, 
										DWORD password, 
										BYTE recommission);


RFID_API err_t ISO18000p3m3_ReadPC(RFID_READER_HANDLE hr, 
								RFID_TAG_HANDLE ht, 
									WORD *pc);


RFID_API err_t ISO18000p3m3_WritePC(RFID_READER_HANDLE hr, 
								RFID_TAG_HANDLE ht, 
								WORD mask, 
									WORD pc);






#ifdef __cplusplus
}
#endif









#endif
